"use strict";

(function () {
  function r(e, n, t) {
    function o(i, f) {
      if (!n[i]) {
        if (!e[i]) {
          var c = "function" == typeof require && require;
          if (!f && c) return c(i, !0);
          if (u) return u(i, !0);
          var a = new Error("Cannot find module '" + i + "'");
          throw a.code = "MODULE_NOT_FOUND", a;
        }

        var p = n[i] = {
          exports: {}
        };
        e[i][0].call(p.exports, function (r) {
          var n = e[i][1][r];
          return o(n || r);
        }, p, p.exports, r, e, n, t);
      }

      return n[i].exports;
    }

    for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) {
      o(t[i]);
    }

    return o;
  }

  return r;
})()({
  1: [function (require, module, exports) {
    "use strict";

    loader.define(['pages/config/config'], function (config, require, exports, module, global) {
      var pageview = {};

      pageview.init = function () {
        var gintro;
        bui.getPageParams(function (res) {
          gintro = res.gintro;
        });
        $(".intro-main #gintro").attr("value", gintro);
        var gintroInput = bui.input({
          id: ".gintro-input",
          callback: function callback(e) {
            // 清空数据
            this.empty();
          }
        });
        $("#itro-btn").on("click", function (e) {
          var intro = $(".intro-main #gintro").attr("value");
          console.log(intro);
          var data_ = {
            groupid: '36',
            // mobile
            introduction: intro // password

          };
          data_ = JSON.stringify(data_);
          bui.ajax({
            // url: 相对路径
            url: config.apiurl + "api/v1.0/refreshGroupIntro",
            data: data_,
            method: "post",
            headers: {
              'Content-Type': 'application/json'
            }
          }).then(function (res) {
            console.log(res);
            bui.hint(res.errmsg);
          }, function (res, status) {
            console.log(status);
          });
        });
        $("#back").on("click", function (e) {
          var intro = $(".intro-main #gintro").attr("value");
          bui.back(function () {
            console.log(intro);
            $(".detail-main #gintro").text(intro);
          });
        });
      };

      pageview.init();
      return pageview;
    });
  }, {}]
}, {}, [1]);